package 力扣;

public class 回文数 {
    public static void main(String[] args){
        String b = "";
        System.out.println(b.substring(b.length()/2,b.length()/2+1));
    }
    public static boolean isPalindrome(int x) {
        if (x<0) return  false;
        else if(x>0&&x<9) return  true;
        else {
            String b = String.valueOf(x);
            for (int a=0;a<b.length();a++){
                int c = Integer.parseInt(b.substring(a,a+1));
                c =  c ^ c;
                if (c==0||c==Integer.parseInt(b.substring(b.length()/2,b.length()/2+1))){return true;}
            }
        }
        return false;
    }
}
